package com.bonc.ioc.demo.service;

import com.bonc.ioc.demo.feign.FileFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author tangbiao
 */
@Service
public class FileService {
    @Autowired
    FileFeignClient fileFeignClient;

    public void upload(MultipartFile file, String project){
        fileFeignClient.uploadFile(file,project);
    }

    public String download(int id){
        return fileFeignClient.downloadFile(id);
    }
}
